package ch03.cat;

import java.lang.reflect.Proxy;

public class IntermediaryJdkProxyFactory {
    public static <T> T create(Object target){
        IntermediaryIntemediaryCat cat=new IntermediaryIntemediaryCat();
        cat.setCat(target);
        return (T)Proxy.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(),cat);
    }
}
